package com.sudo.dao.admin.model.bo;

import com.sudo.common.utils.PatternUtil;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

/**
 * @author 为道日损 2020-06-23 16:50
 * webSite：https://www.sudo.ren
 */
@Data
public class SysDictBO {
    @NotBlank(message = "字典名称不能为空")
    @Length(max = 30,message = "字典名最大长度不超过30位")
    private String dictName;

    @NotBlank(message = "字典代码不能为空")
    @Pattern(regexp= PatternUtil.DICT_CODE,message="按钮代码必须是3~30位数字、字母或下划线")
    private String dictCode;

    private String parentCode;

    @Length(max = 255,message = "备注最大长度不超过255位")
    private String note;

}
